package com.nail.api.customMake.service;

import com.nail.api.customMake.bean.Indent;
import com.nail.api.user.bean.User;
import com.nail.enumeration.PaypalPaymentIntent;
import com.nail.enumeration.PaypalPaymentMethod;
import com.nail.service.IBaseService;
import com.paypal.api.payments.Payment;
import com.paypal.base.rest.PayPalRESTException;

/**
 * Created by jie on 2017/10/9.
 */
public interface IPaypalService extends IBaseService{

    public Payment createPayment(
            Double total,
            String currency,
            PaypalPaymentMethod method,
            PaypalPaymentIntent intent,
            String description,
            String cancelUrl,
            String successUrl) throws PayPalRESTException;

    public Payment executePayment(String paymentId, String payerId) throws PayPalRESTException;

    public void setPayMessage(User user, Indent indent, String paymentId, String payerId);
    
    void refreshAPIContext();
}
